﻿using B.S.BaseData.Api.Read.Command.GoodsCommand;
using B.S.BaseData.Api.Read.Command.HospitalCommand;
using B.S.BaseData.Api.Read.Command.RBAC;
using B.S.BaseData.ErrorCode;
using B.S.BataBase.Domain.AI;
using B.S.BataBase.Domain.DTO;
using B.S.BataBase.Domain.DTO.GoodsDTO;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace B.S.BaseData.Api.Read.Controllers
{
    /// <summary>
    /// 患者管理
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class HospitoryController : ControllerBase
    {
        /// <summary>
        /// 中介者
        /// </summary>
        private readonly IMediator _mediator;
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="mediator">中介者</param>
        public HospitoryController(IMediator mediator)
        {
            _mediator = mediator;
        }
        /// <summary>
        /// 患者列表显示
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<APIResult<ApiPaging<PatientModel>>> PatientShow([FromQuery] PatientShowCommand command)
        {
            return _mediator.Send(command);
        }
        /// <summary>
        /// 就诊列表显示
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<APIResult<ApiPaging<VisitDTO>>> HistoryOfMedicalVisitsShow([FromQuery] HistoryOfMedicalVisitsShowCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 就诊类型显示
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<APIResult<List<VisitTypeModel>>> VisitTypeShow([FromQuery] VisitTypeShowCommand command)
        {
            return _mediator.Send(command);
        }
        /// <summary>
        /// 医生显示
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<APIResult<List<DoctorModel>>> DockorShow([FromQuery] DockorShowCommand command)
        {
            return _mediator.Send(command);
        }
        /// <summary>
        /// 患者信息回显
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<APIResult<PatientModel>> PatientFt([FromQuery] PatientFtCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 支付信息回显
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<APIResult<HistoryOfMedicalVisitsModel>> HistoryOfMedicalVisitsFT([FromQuery]HistoryOfMedicalVisitsFTCommand command)
        {
            return await _mediator.Send(command);
        }
    }
}
